#include "MainWindow.h"
#include "Version.h"

#include "AboutDlg.h"

MainWindow::MainWindow(QWidget *parent)
	: QMainWindow(parent)
{
	ui.setupUi(this);

	setWindowTitle("PointLab"+GetPointLabVersion());

	connectActions();
}

void MainWindow::connectActions()
{
	connect(ui.actionQuit, &QAction::triggered, this, &MainWindow::doActionClose);

	connect(ui.actionAbout, &QAction::triggered, this, &MainWindow::doActionShowAboutDialog);
}

void MainWindow::doActionLoadFile()
{
}

void MainWindow::doActionSaveFile()
{
}

void MainWindow::doActionClose()
{
	this->close();
}

void MainWindow::doActionShowAboutDialog()
{
	AboutDlg about;
	about.exec();
}

void MainWindow::doActionShowHelpDialog()
{
}